Fix static build dependencies (Boost/Blosc) for Linux #104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses build failures (linker errors) encountered when building Snapmaker OrcaSlicer statically on Linux environments (tested on Ubuntu 22.04).
CMakeLists.txtto conditionally defineBOOST_LOG_DYN_LINKbased onBoost_USE_STATIC_LIBSrather thanSLIC3R_STATIC. This ensures thatboost::logis correctly linked without expecting dynamic symbols when static libraries are used.src/libslic3r/CMakeLists.txtto changeBlosc::blosclinking fromPRIVATEtoPUBLIC. This ensures thatBloscsymbols (required by OpenVDB) are properly propagated to the executable, resolving undefined reference errors likeblosc_compress_ctx.These changes enable successful compilation with
-DSLIC3R_STATIC=ON, improving build compatibility for Linux distributions like Ubuntu 22.04.Screenshots/Recordings/Graphs
N/A (Build system configuration fix)
Tests
I have verified these changes by building the project on Ubuntu 22.04 LTS:
cmake -S . -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DSLIC3R_STATIC=ON \ -DOPENVDB_USE_STATIC_LIBS=ONcmake --build buildcompleted successfully without linker errors.